package awt;

import javax.swing.JButton;
import javax.swing.JFrame;

public class HelloWorld extends JFrame {
	// 把需要的swing组件放到这
	JButton jb1 = null;

	public static void main(String[] args) {
		HelloWorld hw = new HelloWorld();
	}

	public HelloWorld() {
		jb1 = new JButton("我是一个按钮");
		this.add(jb1);
		this.setTitle("hello,world");
		this.setSize(300, 200);
		this.setLocation(100, 200);
		this.setVisible(true);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	}
}
